package rmi.utils.common;

import java.net.URL;
import java.net.URLClassLoader;


public class RMICommon {

	public RMICommon() {
		super();
	}

	protected void computeCodeBase() {
		URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
		URL[] urls = sysloader.getURLs();
		StringBuilder codeBase = new StringBuilder();
		for(URL url : urls){
			codeBase.append(url + " ");
		}
		System.setProperty("java.rmi.server.codebase", codeBase.toString());
	}

}